package com.yxc.dockerjavademo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.util.concurrent.atomic.AtomicInteger;

@SpringBootApplication
public class DockerJavaDemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DockerJavaDemoApplication.class, args);
        AtomicInteger i = new AtomicInteger();
        Thread thread = new Thread(() -> {
            while (true) {
                System.out.println("test: " + i);
                i.getAndIncrement();
                try {
                    Thread.sleep(10);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }

        });

        thread.start();
    }

}
